package com.feicheng.mapper;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.feicheng.entity.SaleOrderHeader;
import com.feicheng.model.SaleOrderHeaderWithUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 周启博
 * @since 2022-06-27
 */
@Mapper
public interface SaleOrderHeaderMapper extends BaseMapper<SaleOrderHeader> {
    @Select("select customer_name,customer_telephone,customer_frame_no,customer_car_no,state from sale_order_header where sale_id = #{value}")
    SaleOrderHeader queryUserInfo(Integer saleId);

    Page<SaleOrderHeaderWithUser> PageConditionSelect(
            Page<SaleOrderHeaderWithUser> saleOrderHeaderPage,
            @Param(Constants.WRAPPER) Wrapper<SaleOrderHeaderWithUser> wrapper);

}
